package com.spring.demo3.eg2;

/**
 * @author vhans
 */
public class User {
    private String name;

    public User() {
        System.out.println("调用默认构造器");
    }

    public User(String name) {
        this.name = name;
    }

    public void say() {
        System.out.println("你好:" + name);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
